#include<bits/stdc++.h>
using namespace std;
inline int read(){
    int x=0,f=1;char C=getchar();
    while(C<'0'||C>'9'){if(C=='-')f=-1;C=getchar();}
    while(C>='0'&&C<='9')x=x*10+(C^48),C=getchar();
    return x*f;
}
inline void write(int x){
    if(x<0)putchar('-'),x=-x;
    if(x>=10)write(x/10);
    putchar(x%10+'0');
}
const int N=1e5+5;
int n,a[N],ans;
bool vis[N];
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n=read();
    for(int i=1;i<=n;i++){
        a[i]=read();
    }
    sort(a+1,a+n+1);
    for(int i=1,to=2;i<=n;i++){
        while(a[i]==a[to]&&to<=n){
            to++;
        }
        if(to<=n){
            ans++;
            to++;
        }
    }
    cout<<n-ans;
    return 0;
}